import { request } from './index'

// 添加地址
export const addAddress = (data) => {
    return request({
        url: '/api/address',
        method: 'post',
        data
    })
}

// 编辑地址
export const EditAddress = (id, data) => {
    return request({
        url: `/api/address/${id}`,
        method: 'put',
        data
    })
}

// 删除地址
export const DeleteAddress = (id) => {
    return request({
        url: `/api/address/${id}`,
        method: 'delete'
    })
}

// 地址列表
export const getAddressList = () => {
    return request({
        url: '/api/address'
    })
}

// 地址详情
export const getAddressDetail = (id) => {
    return request({
        url: `/api/address/${id}`,
    })
}